{include file="header" }
{include file="sibar" }

<div class="main-content">
    <div class="main-content-inner">
        <!-- #section:basics/content.breadcrumbs -->
        <div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="ace-icon fa fa-cog home-icon"></i>
                    <a href="#">系统管理</a>
                </li>
                <li>
                    <span>后台菜单</span>
                </li>
            </ul><!-- /.breadcrumb -->
        </div>

        <div class="page-content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="row">
                                <div class="col-xs-9">
                                    <p>
                                        <a class="btn btn-primary" href="{:U('add')}"><i class="ace-icon fa fa-plus"></i>添加</a>
                                        <a class="btn btn-success set-status-batch" __href__="{:U('setStatus')}" __status__="resume"><i class="ace-icon fa fa-check"></i>启用</a>
                                        <a class="btn btn-warning set-status-batch" __href__="{:U('setStatus')}" __status__="forbid"><i class="ace-icon fa fa-ban"></i>禁用</a>
                                        <a class="btn btn-danger set-status-batch" __href__="{:U('setStatus')}" __status__="delete"><i class="ace-icon fa fa-remove"></i>删除</a>
                                    </p>
                                </div>
                                <div class="col-xs-12 col-sm-3">
                                    <form action="" method="get" id="search-form">
                                        <div class="input-group">
                                            <input class="form-control input-mask-product" name="keyword" type="text" value="{$keyword}" placeholder="请输入ID/名称">
                                            <span class="input-group-addon" onclick="javascript: $('#search-form').submit();">
                                                <i class="ace-icon fa fa-search"></i>
                                            </span>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="tabbable">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th><input class="check-all" type="checkbox"></th>
                                        <th>ID</th>
                                        <th class="hidden-200">标题</th>
                                        <th>标识</th>
                                        <th class="hidden-200">URL</th>
                                        <th>类型</th>
                                        <th>图标</th>
                                        <th>排序</th>
                                        <th>状态</th>
                                        <th class="text-center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach $list as $item}
                                    <tr>
                                        <td><input class="ids" type="checkbox" value="{$item.id}" name="ids[]"></td>
                                        <td>{$item.id}</td>
                                        <td>{$item.title_show}</td>
                                        <td>{$item.name}</td>
                                        <td>{$item.url}</td>
                                        <td>{eq name="item.type" value="1"}菜单{else /}权限{/eq}</td>
                                        <td><i class="fa {$item.icon}"></i></td>
                                        <td>{$item.sort}</td>
                                        <td>{$item.status|html_status}</td>
                                        <td class="text-center">
                                            <a class="btn btn-primary btn-sm" href="{:U('edit', ['id' => $item['id']])}">编辑</a>
                                            <a class="btn btn-sm btn-success ajax-set-status" __data_id__="{$item.id}" __href__="{:U('setStatus')}" __status__="resume">启用</a>
                                            <a class="btn btn-sm btn-warning ajax-set-status" __data_id__="{$item.id}" __href__="{:U('setStatus')}" __status__="forbid">禁用</a>
                                            <a class="btn btn-danger btn-sm ajax-set-status" __data_id__="{$item.id}" __href__="{:U('setStatus')}" __status__="delete">删除</a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                    </tbody>
                                </table>

                                <div class="pull-right">
                                    <ul class="pagination">{$page}</ul>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{include file="footer" }
